﻿--[[
Combuctor_Gather	v 1.11	2009.1.17
	专为Combuctor配备的小插件,提供矿石,草药和皮革的分类标签
	爱西妮娅

--]]

--[[
自定义
local UserType={}

--]]

--[[
"Elemental","元素","元素材料",
"Cloth","布料","布料",
"Leather","皮革","皮革",
"Metal & Stone","金属和矿石","金屬與石頭",
"Meat","肉类","肉類",
"Herb","草药","草藥",
"Enchanting","附魔","附魔",
"Jewelcrafting","珠宝加工","珠寶設計",
"Parts","零件","零件",
"Devices","装置","裝置",
"Explosives","爆炸物","爆裂物",
"Materials","原料","原料",
"Other","其它","其他",
]]


local CombuctorSet = Combuctor:GetModule("Sets")
local L={}
L["Combuctor_bagType_Herb"] = select(6, GetAuctionItemSubClasses(6))
L["Combuctor_bagType_MetalStone"] = select(4, GetAuctionItemSubClasses(6))
L["Combuctor_bagType_Gather"] = "Gather"
L["Combuctor_bagType_All"] = "All"
L["Combuctor_bagType_TradeGoods"] = select(6, GetAuctionItemClasses())
L["Combuctor_bagType_Leather"]=select(3, GetAuctionItemSubClasses(6))


if (GetLocale()=="zhCN") then
	L["Combuctor_bagType_Gather"] = "采集"
	L["Combuctor_bagType_All"] = "全部"
elseif (GetLocale()== "zhTW") then
	L["Combuctor_bagType_Gather"] = "采集"
	L["Combuctor_bagType_All"] = "全部"
end 



local function isGather(player, bagType, name, link, quality, level, ilvl, type, subType, stackCount, equipLoc)
	return ((subType == L["Combuctor_bagType_Herb"] or subType==L["Combuctor_bagType_MetalStone"] or subType == L["Combuctor_bagType_Leather"])  and type==L["Combuctor_bagType_TradeGoods"])
end
CombuctorSet:Register(L["Combuctor_bagType_Gather"], "Interface/Icons/INV_Misc_EngGizmos_19", isGather)

local function isMetal(player, bagType, name, link, quality, level, ilvl, type, subType, stackCount, equipLoc)
	return (subType == L["Combuctor_bagType_MetalStone"] and type==L["Combuctor_bagType_TradeGoods"])
end

local function isHerb(player, bagType, name, link, quality, level, ilvl, type, subType, stackCount, equipLoc)
	return (subType == L["Combuctor_bagType_Herb"] and type==L["Combuctor_bagType_TradeGoods"])
end

local function isLeather(player, bagType, name, link, quality, level, ilvl, type, subType, stackCount, equipLoc)
	return (subType == L["Combuctor_bagType_Leather"] and type==L["Combuctor_bagType_TradeGoods"])
end

CombuctorSet:RegisterSubSet(L["Combuctor_bagType_All"],L["Combuctor_bagType_Gather"],nil,isGather)
CombuctorSet:RegisterSubSet(L["Combuctor_bagType_MetalStone"],L["Combuctor_bagType_Gather"],nil,isMetal)
CombuctorSet:RegisterSubSet(L["Combuctor_bagType_Herb"],L["Combuctor_bagType_Gather"],nil,isHerb)
CombuctorSet:RegisterSubSet(L["Combuctor_bagType_Leather"],L["Combuctor_bagType_Gather"],nil,isLeather)

